Gradual type theory
نویسندگان
چکیده
Abstract Gradually typed languages are designed to support both dynamically and statically programming styles while preserving the benefits of each. Sound gradually check types at runtime boundary between modules. However, there is much disagreement in gradual typing literature over how enforce complex such as tuples, lists, functions objects. In this paper, we propose a new perspective on design type enforcement: casts exist precisely ensure correctness certain type-based refactorings optimizations. For instance, for simple types, language designer might desire that beta-eta equality valid. We show useful by demonstrating cast semantics can be derived from equality. do providing an axiomatic account program equivalence calculus logic call theory (GTT). Based Levy’s call-by-push-value, GTT allows us axiomatize call-by-value call-by-name languages. then derive behavior corresponding eta principle assumption satisfies property called graduality , also known dynamic guarantee. Since equality, receive contrapositive: any observably different must violate consistency applicability our proving contract-based implementation using lazy gives logical relations model theory, where implies contextual programs. axiomatizes guarantee, establishes central theorem typing. The parameterized so family implementations validate optimization
منابع مشابه
Call-by-name Gradual Type Theory
We present gradual type theory, a logic and type theory for call-by-name gradual typing. We define the central constructions of gradual typing (the dynamic type, type casts and type error) in a novel way, by universal properties relative to new judgments for gradual type and term dynamism, which were developed in blame calculi and to state the “gradual guarantee” theorem of gradual typing. Comb...
متن کاملGradual Liquid Type Inference
We present gradual liquid type inference, a novel combination of refinement types with gradual refinements that range over a finite set of SMT-decidable predicates. This finiteness restriction allows for an algorithmic inference procedure where all possibly valid interpretations of a gradual refinement are exhaustively checked. Thanks to exhaustive searching we can detect the safe concretizatio...
متن کاملGradual type-and-effect systems
Effect systems have the potential to help software developers, but their practical adoption has been very limited. We conjecture that this limited adoption is due in part to the difficulty of transitioning from a system where effects are implicit and unrestricted to a system with a static effect discipline, which must settle for conservative checking in order to be decidable. To address this hi...
متن کاملA Theory of Gradual Institutional Change
Once created, institutions often change in subtle and gradual ways over time. Although less dramatic than abrupt and wholesale transformations, these slow and piecemeal changes can be equally consequential for patterning human behavior and for shaping substantive political outcomes. Consider, for example, the British House of Lords. This is an institution that began to take shape in the thirtee...
متن کاملGradual Typing for Annotated Type Systems
Refinement type systems have been proposed by a number of researchers to sharpen the guarantees of existing type systems. Examples are systems that distinguish empty and non-empty lists by type, taint tracking and information flow control, dimension analysis, and many others. In each case, the type language is extended with annotations that either abstract semantic properties of values beyond t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Journal of Functional Programming
سال: 2021
ISSN: ['0956-7968', '1469-7653']
DOI: https://doi.org/10.1017/s0956796821000125